/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "stdafx.h"
#include "VK粒子.h"

using namespace std;



void f_createVk点绘制粒子(S_粒子系统配置* psys, uint32 num, S_设备环境 ctx) {
	psys->m_Ctx = ctx;

	psys->m_Loc = (S_结构对象指针)f_buf_create板载缓存(ctx, sizeof(vec3));
	psys->m_Vel = (S_结构对象指针)f_buf_create板载缓存(ctx, sizeof(vec3));
	psys->m_Size = (S_结构对象指针)f_buf_create板载缓存(ctx, sizeof(vec3));


	std::vector<vec3> data(num);
	f_buf_fill板载缓存((S_板载缓存*)psys->m_Loc, data, E_板载缓存类型::e_VBO);
	f_buf_fill板载缓存((S_板载缓存*)psys->m_Vel, data, E_板载缓存类型::e_VBO);
	f_buf_fill板载缓存((S_板载缓存*)psys->m_Size, data, E_板载缓存类型::e_VBO);
	//f_resize板载缓存((S_板载缓存*)psys->m_Loc, num, E_板载缓存类型::e_VBO);
	//f_resize板载缓存((S_板载缓存*)psys->m_Vel, num, E_板载缓存类型::e_VBO);
	//f_resize板载缓存((S_板载缓存*)psys->m_Size, num, E_板载缓存类型::e_VBO);
	f_df_init_GPU参数布局(&psys->m_GPU参数布局);

}


void f_createVk实例物体绘制粒子(S_粒子系统配置* psys, uint32 num, S_设备环境 ctx) {

	return;
}






void f_Vk粒子绘制(S_粒子系统配置* psys, S_渲染参数& 渲染参数) {
	std::vector<S_板载缓存*> bg(2);
	bg[0] = (S_板载缓存*)psys->m_Loc;
	bg[1] = (S_板载缓存*)psys->m_Vel;

	//f_Draw_序列(psys->m_Ctx, psys->m_Material, (S_板载缓存*)psys->m_Loc, 渲染参数);
	
}






